package com.zhisheng.gufei.web.action.produce;

import java.util.List;

import javax.annotation.Resource;

import com.demo2do.lighturl.annotation.Action;
import com.zhisheng.core.web.action.BaseAction;
import com.zhisheng.gufei.produce.entity.GrabageProduceDestInfo;
import com.zhisheng.gufei.produce.entity.GrabageStat;
import com.zhisheng.gufei.produce.service.GrabageStatService;

public class StatAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1323232321L;
	
	@Resource
	private GrabageStatService grabageStatService;
	
	private List<GrabageStat> statsBygId;
	
	private List<GrabageStat> statsByCity;
	
	private List<GrabageProduceDestInfo> subCityInfoList;
	
	private String jsonData;
	
	private Integer cityId;
	
	@Action("/stat/show")
	public String showResult() {
	    statsBygId = grabageStatService.getStatBySortId();
	    statsByCity = grabageStatService.getStatByCity();
	    jsonData = grabageStatService.getAllJsonDataByCity();
	    
	    return "result";
	}
	
	@Action("/stat/subCity/${cityId}")
	public String subCity() {
	    subCityInfoList = grabageStatService.getStatByCityId(cityId);
	    
	    return "corp";
	}

    public List<GrabageStat> getStatsBygId() {
        return statsBygId;
    }

    public void setStatsBygId(List<GrabageStat> statsBygId) {
        this.statsBygId = statsBygId;
    }

    public List<GrabageStat> getStatsByCity() {
        return statsByCity;
    }

    public void setStatsByCity(List<GrabageStat> statsByCity) {
        this.statsByCity = statsByCity;
    }

    public String getJsonData() {
        return jsonData;
    }

    public void setJsonData(String jsonData) {
        this.jsonData = jsonData;
    }

    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    public List<GrabageProduceDestInfo> getSubCityInfoList() {
        return subCityInfoList;
    }

    public void setSubCityInfoList(List<GrabageProduceDestInfo> subCityInfoList) {
        this.subCityInfoList = subCityInfoList;
    }


}
